#pragma once

#include "ILODSelector.h"
#include <DXUT.h>

namespace e3d
{
	class IRenderObject;

	class DistanceLODSelector : public ILODSelector
	{
	public:
		DistanceLODSelector() { m_currentLOD = 0; };
		~DistanceLODSelector(){};

		virtual bool isLODSufficient( IRenderObject* obj, const D3DXVECTOR3* camPos );
		void currentLOD( unsigned int LOD );

		void setFovy( float fovy ) { m_fovy = fovy; }
		void setPixH( int pixH ) { m_pixH = pixH; }
		void setMView( D3DXMATRIX mView ) { m_mView = mView; }
		void setScreenSpaceError( float x ) { m_screenSpaceError = x; }

	private:
		float m_fovy;
		int m_pixH;
		D3DXMATRIX m_mView;
		float m_screenSpaceError;
	};
}
